<?php
    $dati=$this->data;
    $this->title = $dati['titolo'];
    $this->headTitle($this->title);

    $allDisco = $this->allDisco;
    $zonaList = $this->zonaList;
    
    $unique_name = $this->unique_name;

    $id=$this->id;
?>
<?php
/**
 *  dispay all disco in  sponsor0
 */
$line = '<div id="box">';
foreach ($allDisco as $key=>$allDisco2){
    $line_new = '<h2><a href="'. $this->url(array('controller'=>'Club',
                                                  'name'=> $allDisco2[0],
                                                   ), 'locale', TRUE) .'">' . $allDisco2[1]
              . '</a></h2>';
    $line = $line . $line_new;
    }
$line = $line . '</div>';
$this->layout()->sponsor0 = $line;

/**
 * dispay all "provincia" in  provincia
 */
$line4 = '';
foreach ($zonaList as $key=>$zonaList2){
    $line4_new = '<h2><a href="'. $this->url(array('controller'=>'Index',
                                                    'action'=>'provincia',
                                                    'id'=> $zonaList2,
                                                   ), 'index', TRUE) .'">' . $zonaList2 . '</a></h2>';
    $line4 = $line4 . $line4_new;
    }
$line4 = $line4 . '';
$this->layout()->provincia = $line4;
?>

<? 
$dati=$this->data;

require_once 'models/Db/Event_db.php';
$piva = $dati['piva'];
$name_disco = Event_db::getNameDsicoByPiva($piva);
$name_disco = $name_disco['name'];
echo "<img src=\"$this->image\" alt=\"flyer\">";
//echo "Titolo evento: ".$dati['titolo'] . "<br>";
echo "<br><br>";
echo html_entity_decode($dati['descrizione']) ."<br><br>";
if($this->pren==1){ // prenotazione lista o tavolo
    //echo "Vuoi iscriverti all' evento del " . $dati['data_inizio'] . "?  ";
    //echo '<a href="/Subscribe/subscribe-disco-event/' . $dati['id'] . '">Iscriviti</a>';
    echo "<a class=\"sub_link_a\" href=\"/Subscribe/subscribe-disco-list/id/$id\"><span class=\"sub_link_span\">iscriviti alla lista</span></a>";
    echo "<a class=\"sub_link_a\" href=\"/Subscribe/subscribe-disco-table/id/$id\"><span class=\"sub_link_span\">prenota tavoli</span></a>";
}
// richiesta informazioni
echo "<a class=\"sub_link_a\" href=\"/Subscribe/subscribe-disco-info/id/$id\"><span class=\"sub_link_span\">richiedi info</span></a>";
echo "<a class=\"sub_link_a\" href=\"/$unique_name/ \"><span class=\"sub_link_span\">vedi mappa</span></a>";
echo "<br><br>";
?>
<br />
<p><- <a href="<?php echo $this->url(array('controller'=>'index',
                                           'action'=>'eventi'),
                                           'index', TRUE);?>">torna agli eventi</a></p>